package org.jpro.config;

import javax.annotation.PostConstruct;

import org.jpro.shiro.freemarker.ShiroTags;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

/**
 * <P>功能描述 : FreeMarker配置 </P>
 * <P>Method Name : FreeMarkerConfig </P>
 * <P>Author : 王泽浩 </P>
 * <P>E-Mail : 1028625100@qq.com </P>
 * <P>Date : 2017-03-15 15:08:25</P>
 * @since 1.0
 */
@Configuration
public class FreeMarkerConfig {

    /**
     * The Configuration.
     */
    @Autowired
    private freemarker.template.Configuration configuration;

    /**
     * 设置shiro标签
     */
    @PostConstruct
    public void setSharedVariable() {
        configuration.setSharedVariable("shiro", new ShiroTags());
    }
}
